﻿using gt.ShortMessage.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace gt.ShortMessage.Services
{
    public interface ITokenService
    {
        /// <summary>
        /// 生成验证结果Token
        /// </summary>
        /// <param name="phone">手机号</param>
        /// <param name="uniqueId">设备号</param>
        /// <returns></returns>
        string CreateVerifyResultToken(string phone, string uniqueId);
        /// <summary>
        /// 验证 验证码结果 token
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        bool VerifyVerifyResultToken(string token);
        /// <summary>
        /// 生成token
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        string CreateActiveCodeToken(ActiveCode code);
        /// <summary>
        /// 验证token和code
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        bool VerifyActiveCodeToken(string token, string code,ref ActiveCode activeCode);
    }
}
